import { ApiBase } from '../base/apiBase'
import * as Params from './params'
import * as Responses from './responses'

class CommonApi extends ApiBase {
  login(params: Params.LoginParams) {
    return this.post<Responses.LoginRes>('/login', params)
  }

  register(params: Params.RegisterParams) {
    return this.post('/users', params)
  }

  
  onComment(params:Params.onCommentParams){
    return this.post('/comment',params)
  }

  onCommentOther(zcomid:number|undefined,params:Params.onCommentOtherParams){
    return this.post(`/comment/${zcomid}/reply`,params)
  }
}

export default CommonApi
